/**
 * includes():字符串中是否包含某个内容
 * startsWith():字符串是否以某个内容开始
 * endsWith():字符串是否以某个内容结束
 *
 * 返回值是布尔类型
 */

const msg = `Error: foo is not defined .`;

// const r1 = msg.includes('foo')
const r1 = msg.includes("foo     ");
console.log(r1);

const r2 = msg.startsWith("Error");
console.log(r2);

const r3 = msg.endsWith(".");
console.log(r3);
